home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
5 Star Games: DOS Edition 2
/
5 Star Games - DOS Edition (1995)(Ready to Run).iso
/
dbc
/
db_types.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-28
|
3KB
|
174 lines
/****************************************************************************/
/* HEADER FILE OF COMMON TYPES USED BY DATABOSS MODULES */
/****************************************************************************/
/********************************* TYPES **********************************/
#ifdef __TURBOC__
#ifndef __COMPACT__
#ifndef __LARGE__
#ifndef __HUGE__
#error Memory model chosen must use far pointers by default
#endif
#endif
#endif
#else
#ifndef M_I86CM
#ifndef M_I86LM
#ifndef M_I86HM
#error Memory model chosen must use far pointers by default
#endif
#endif
#endif
#endif
/********** CHAR TYPES **********/
#define False 0
#define True 1
typedef char *charptr;
typedef unsigned char uchar;
typedef uchar string[256];
typedef uchar *strptr;
typedef uchar str8[9];
typedef unsigned char byte;
typedef byte *byteptr;
typedef unsigned char bool;
typedef byte set[32];
/********** INT TYPES **********/
typedef int *intptr;
typedef unsigned int uint;
typedef unsigned int word;
typedef word *wordptr;
typedef union {
word w;
int i;
struct {
byte l;
byte h;
} b;
} splitword;
/********** LONG TYPES **********/
typedef long *longptr;
typedef unsigned long ulong;
typedef unsigned long lword;
typedef lword *lwordptr;
typedef union {
lword lw;
long l;
struct {
word l;
word h;
} w;
} splitlong;
/********** VOID TYPES **********/
typedef void *ptr;
typedef union {
struct {
word ofs;
word seg;
} w;
lword lw;
charptr cptr;
byteptr bptr;
intptr iptr;
wordptr wptr;
longptr lptr;
lwordptr lwptr;
ptr ptr;
} splitptr;
/********** CHAR TYPES **********/
#define FALSE 0
#define TRUE 1
typedef char *CHARPTR;
typedef unsigned char UCHAR;
typedef uchar STRING[256];
typedef uchar *STRPTR;
typedef uchar STR8[9];
typedef unsigned char BYTE;
typedef byte *BYTEPTR;
typedef unsigned char BOOL;
typedef byte SET[32];
/********** INT TYPES **********/
typedef int *INTPTR;
typedef unsigned int UINT;
typedef unsigned int WORD;
typedef word *WORDPTR;
typedef union {
word w;
int i;
struct {
byte l;
byte h;
} b;
} SPLITWORD;
/********** LONG TYPES **********/
typedef long *LONGPTR;
typedef unsigned long ULONG;
typedef unsigned long LWORD;
typedef lword *LWORDPTR;
typedef union {
lword lw;
long l;
struct {
word l;
word h;
} w;
} SPLITLONG;
/********** VOID TYPES **********/
typedef void *PTR;
typedef union {
struct {
word ofs;
word seg;
} w;
lword lw;
charptr cptr;
byteptr bptr;
intptr iptr;
wordptr wptr;
longptr lptr;
lwordptr lwptr;
ptr ptr;
} SPLITPTR;
/***************************** END OF DB_TYPES.H ****************************/